import Vue from 'vue'
import Router from 'vue-router'
import Home from '../pages/Home'
import User from "../pages/User"
import Find from '../pages/Find'

import Communlity from '../pages/Communlity'
Vue.use(Router)

export default new Router({

  routes: [
    {
      path: "/",
      component: Home
    },
    {
      path: "/user",
      component: resolve => {
        require(['../pages/User'], resolve)
      }
    },

    {
      path: "/communlity",
      component: resolve => {
        require(['../pages/Communlity'], resolve)
      }
    },
    {
      path: "/Find",
      component: resolve => {
        require(['../pages/Find'], resolve)
      }
    },
    {
      path: "/More/:id/:name",
      component: resolve => {
        require(['../pages/More'], resolve)
      }
    },
    {
      path: "/Category/:id/:number",
      component: resolve => {
        require(['../pages/Category'], resolve)
      }
    },
    {
      path: "/moods",
      component: resolve => {
        require(['../pages/moods'], resolve)
      }
    },
    {
      path: "/urge",
      component: resolve => {
        require(['../pages/urge'], resolve)
      }
    },
    {
      path: "/collect",
      component: resolve => {
        require(['../pages/collect'], resolve)
      }
    },
    {
      path: "/click",
      component: resolve => {
        require(['../pages/click'], resolve)
      }
    },
    {
      path: "/anli",
      component: resolve => {
        require(['../pages/anli'], resolve)
      }
    },
    {
      path: "/login",
      component: resolve => {
        require(['../pages/login'], resolve)
      }
    },
    {
      path: "/register",
      component: resolve => {
        require(['../pages/register'], resolve)
      }
    }

  ]
})
